package com.zhsource.article.repository;

import com.zhsource.article.document.Comment;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>@ClassName：CommentRepository
 * <p>@Date 2023/10/29  21:16
 *
 * @Author zzl
 **/

@Repository
public interface CommentRepository  extends MongoRepository<Comment,String> {

    // find: 代表我要查询
    // ByArticleId: 我要根据Coment的articleId查询
    // 严格按照他的命名规则来书写
    List<Comment> findByArticleId(Long articleId);
}
